#ifndef __SYS_H__
#define __SYS_H__

#include <STC15F2K60S2.H>


typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned long ulong;

#define LED(X) {P0 = ~X; P2 = P2 & 0x1F | 0x80; P2 &= 0x1F;}//1000 0000 80
#define BUR(X) {P0 = X; P2 = P2 & 0x1F | 0xA0; P2 &= 0x1F;}//1010 0000 A0  BUZ 0x40  RELAY 0x10
#define COM(X) {P0 = X; P2 = P2 & 0x1F | 0xC0; P2 &= 0x1F;}//1100 0000 C0
#define SEG(X) {P0 = X; P2 = P2 & 0x1F | 0xE0; P2 &= 0x1F;}//1110 0000 E0


#endif